package com.yanfan.maintain.domain.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author caijinkang
 * @date 2023年04月04日 16:32
 */
public class TaskBody {
    /**
     * 任务名称
     *
     * @author caijinkang
     * @date 2023/4/4 16:33
     * @param null
     * @return null
     */
    private String name;
    /**
     * 保养人员
     *
     * @author caijinkang
     * @date 2023/4/4 16:33
     * @param null
     * @return null
     */
    private String human;
    /**
     * 任务开始时间
     *
     * @author caijinkang
     * @date 2023/4/4 16:34
     * @param null
     * @return null
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date beginDate;
    /**
     * 任务结束时间
     *
     * @author caijinkang
     * @date 2023/4/4 16:34
     * @param null
     * @return null
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endDate;
    /**
     * 任务规则（1：时，2：日，3：周）
     *
     * @author caijinkang
     * @date 2023/4/4 16:35
     * @param null
     * @return null
     */
    private Integer period;
    /**
     * 任务规则（0为临时任务 1为定期任务）
     *
     * @author caijinkang
     * @date 2023/4/4 16:36
     * @param null
     * @return null
     */
    private Integer rule;
    /**
     * 倒计时天数
     *
     * @author caijinkang
     * @date 2023/4/4 16:37
     * @param null
     * @return null
     */
    private Integer days;

    public TaskBody() {
    }

    public TaskBody(String name, String human, Date beginDate, Date endDate, Integer period, Integer rule, Integer days) {
        this.name = name;
        this.human = human;
        this.beginDate = beginDate;
        this.endDate = endDate;
        this.period = period;
        this.rule = rule;
        this.days = days;
    }

    @Override
    public String toString() {
        return "TaskBody{" + "name='" + name + '\'' + ", human='" + human + '\'' + ", beginDate=" + beginDate + ", endDate=" + endDate + ", period=" + period + ", rule=" + rule + ", days=" + days + '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getHuman() {
        return human;
    }

    public void setHuman(String human) {
        this.human = human;
    }

    public Date getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Integer getPeriod() {
        return period;
    }

    public void setPeriod(Integer period) {
        this.period = period;
    }

    public Integer getRule() {
        return rule;
    }

    public void setRule(Integer rule) {
        this.rule = rule;
    }

    public Integer getDays() {
        return days;
    }

    public void setDays(Integer days) {
        this.days = days;
    }
}
